Optimal. Leaf size=322 \[ \frac {(b+2 c x) \sqrt {a+b x+c x^2} \left (-8 c^2 (a e h+a f g+2 b d h+2 b e g)+2 b c (6 a f h+5 b (e h+f g))-7 b^3 f h+32 c^3 d g\right )}{128 c^4}+\frac {\left (a+b x+c x^2\right )^{3/2} \left (-2 c h (16 a f h+25 b (e h+f g))+35 b^2 f h^2-6 c h x (7 b f h-10 c e h+6 c f g)-16 c^2 \left (3 f g^2-5 h (d h+e g)\right )\right )}{240 c^3 h}-\frac {\left (b^2-4 a c\right ) \tanh ^{-1}\left (\frac {b+2 c x}{2 \sqrt {c} \sqrt {a+b x+c x^2}}\right ) \left (-8 c^2 (a e h+a f g+2 b d h+2 b e g)+2 b c (6 a f h+5 b (e h+f g))-7 b^3 f h+32 c^3 d g\right )}{256 c^{9/2}}+\frac {f (g+h x)^2 \left (a+b x+c x^2\right )^{3/2}}{5 c h} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.50, antiderivative size = 322, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 5, integrand size = 30, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.167, Rules used = {1653, 779, 612, 621, 206} \[ \frac {\left (a+b x+c x^2\right )^{3/2} \left (-2 c h (16 a f h+25 b (e h+f g))+35 b^2 f h^2-6 c h x (7 b f h-10 c e h+6 c f g)+c^2 \left (-\left (48 f g^2-80 h (d h+e g)\right )\right )\right )}{240 c^3 h}+\frac {(b+2 c x) \sqrt {a+b x+c x^2} \left (-8 c^2 (a e h+a f g+2 b d h+2 b e g)+2 b c (6 a f h+5 b (e h+f g))-7 b^3 f h+32 c^3 d g\right )}{128 c^4}-\frac {\left (b^2-4 a c\right ) \tanh ^{-1}\left (\frac {b+2 c x}{2 \sqrt {c} \sqrt {a+b x+c x^2}}\right ) \left (-8 c^2 (a e h+a f g+2 b d h+2 b e g)+2 b c (6 a f h+5 b (e h+f g))-7 b^3 f h+32 c^3 d g\right )}{256 c^{9/2}}+\frac {f (g+h x)^2 \left (a+b x+c x^2\right )^{3/2}}{5 c h} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 206
Rule 612
Rule 621
Rule 779
Rule 1653
Rubi steps
\begin {align*} \int (g+h x) \sqrt {a+b x+c x^2} \left (d+e x+f x^2\right ) \, dx &=\frac {f (g+h x)^2 \left (a+b x+c x^2\right )^{3/2}}{5 c h}+\frac {\int (g+h x) \left (-\frac {1}{2} h (3 b f g-10 c d h+4 a f h)-\frac {1}{2} h (6 c f g-10 c e h+7 b f h) x\right ) \sqrt {a+b x+c x^2} \, dx}{5 c h^2}\\ &=\frac {f (g+h x)^2 \left (a+b x+c x^2\right )^{3/2}}{5 c h}+\frac {\left (35 b^2 f h^2-c^2 \left (48 f g^2-80 h (e g+d h)\right )-2 c h (16 a f h+25 b (f g+e h))-6 c h (6 c f g-10 c e h+7 b f h) x\right ) \left (a+b x+c x^2\right )^{3/2}}{240 c^3 h}+\frac {\left (32 c^3 d g-7 b^3 f h-8 c^2 (2 b e g+a f g+2 b d h+a e h)+2 b c (6 a f h+5 b (f g+e h))\right ) \int \sqrt {a+b x+c x^2} \, dx}{32 c^3}\\ &=\frac {\left (32 c^3 d g-7 b^3 f h-8 c^2 (2 b e g+a f g+2 b d h+a e h)+2 b c (6 a f h+5 b (f g+e h))\right ) (b+2 c x) \sqrt {a+b x+c x^2}}{128 c^4}+\frac {f (g+h x)^2 \left (a+b x+c x^2\right )^{3/2}}{5 c h}+\frac {\left (35 b^2 f h^2-c^2 \left (48 f g^2-80 h (e g+d h)\right )-2 c h (16 a f h+25 b (f g+e h))-6 c h (6 c f g-10 c e h+7 b f h) x\right ) \left (a+b x+c x^2\right )^{3/2}}{240 c^3 h}-\frac {\left (\left (b^2-4 a c\right ) \left (32 c^3 d g-7 b^3 f h-8 c^2 (2 b e g+a f g+2 b d h+a e h)+2 b c (6 a f h+5 b (f g+e h))\right )\right ) \int \frac {1}{\sqrt {a+b x+c x^2}} \, dx}{256 c^4}\\ &=\frac {\left (32 c^3 d g-7 b^3 f h-8 c^2 (2 b e g+a f g+2 b d h+a e h)+2 b c (6 a f h+5 b (f g+e h))\right ) (b+2 c x) \sqrt {a+b x+c x^2}}{128 c^4}+\frac {f (g+h x)^2 \left (a+b x+c x^2\right )^{3/2}}{5 c h}+\frac {\left (35 b^2 f h^2-c^2 \left (48 f g^2-80 h (e g+d h)\right )-2 c h (16 a f h+25 b (f g+e h))-6 c h (6 c f g-10 c e h+7 b f h) x\right ) \left (a+b x+c x^2\right )^{3/2}}{240 c^3 h}-\frac {\left (\left (b^2-4 a c\right ) \left (32 c^3 d g-7 b^3 f h-8 c^2 (2 b e g+a f g+2 b d h+a e h)+2 b c (6 a f h+5 b (f g+e h))\right )\right ) \operatorname {Subst}\left (\int \frac {1}{4 c-x^2} \, dx,x,\frac {b+2 c x}{\sqrt {a+b x+c x^2}}\right )}{128 c^4}\\ &=\frac {\left (32 c^3 d g-7 b^3 f h-8 c^2 (2 b e g+a f g+2 b d h+a e h)+2 b c (6 a f h+5 b (f g+e h))\right ) (b+2 c x) \sqrt {a+b x+c x^2}}{128 c^4}+\frac {f (g+h x)^2 \left (a+b x+c x^2\right )^{3/2}}{5 c h}+\frac {\left (35 b^2 f h^2-c^2 \left (48 f g^2-80 h (e g+d h)\right )-2 c h (16 a f h+25 b (f g+e h))-6 c h (6 c f g-10 c e h+7 b f h) x\right ) \left (a+b x+c x^2\right )^{3/2}}{240 c^3 h}-\frac {\left (b^2-4 a c\right ) \left (32 c^3 d g-7 b^3 f h-8 c^2 (2 b e g+a f g+2 b d h+a e h)+2 b c (6 a f h+5 b (f g+e h))\right ) \tanh ^{-1}\left (\frac {b+2 c x}{2 \sqrt {c} \sqrt {a+b x+c x^2}}\right )}{256 c^{9/2}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.48, size = 258, normalized size = 0.80 \[ \frac {\frac {(a+x (b+c x))^{3/2} \left (-2 c h (16 a f h+b (25 e h+25 f g+21 f h x))+35 b^2 f h^2+c^2 (20 h (4 d h+4 e g+3 e h x)-12 f g (4 g+3 h x))\right )}{48 c^2}-\frac {5 h \left (2 \sqrt {c} (b+2 c x) \sqrt {a+x (b+c x)}-\left (b^2-4 a c\right ) \tanh ^{-1}\left (\frac {b+2 c x}{2 \sqrt {c} \sqrt {a+x (b+c x)}}\right )\right ) \left (8 c^2 (a e h+a f g+2 b d h+2 b e g)-2 b c (6 a f h+5 b (e h+f g))+7 b^3 f h-32 c^3 d g\right )}{256 c^{7/2}}+f (g+h x)^2 (a+x (b+c x))^{3/2}}{5 c h} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 1.16, size = 1009, normalized size = 3.13 \[ \text {result too large to display} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.24, size = 495, normalized size = 1.54 \[ \frac {1}{1920} \, \sqrt {c x^{2} + b x + a} {\left (2 \, {\left (4 \, {\left (6 \, {\left (8 \, f h x + \frac {10 \, c^{4} f g + b c^{3} f h + 10 \, c^{4} h e}{c^{4}}\right )} x + \frac {10 \, b c^{3} f g + 80 \, c^{4} d h - 7 \, b^{2} c^{2} f h + 16 \, a c^{3} f h + 80 \, c^{4} g e + 10 \, b c^{3} h e}{c^{4}}\right )} x + \frac {480 \, c^{4} d g - 50 \, b^{2} c^{2} f g + 120 \, a c^{3} f g + 80 \, b c^{3} d h + 35 \, b^{3} c f h - 116 \, a b c^{2} f h + 80 \, b c^{3} g e - 50 \, b^{2} c^{2} h e + 120 \, a c^{3} h e}{c^{4}}\right )} x + \frac {480 \, b c^{3} d g + 150 \, b^{3} c f g - 520 \, a b c^{2} f g - 240 \, b^{2} c^{2} d h + 640 \, a c^{3} d h - 105 \, b^{4} f h + 460 \, a b^{2} c f h - 256 \, a^{2} c^{2} f h - 240 \, b^{2} c^{2} g e + 640 \, a c^{3} g e + 150 \, b^{3} c h e - 520 \, a b c^{2} h e}{c^{4}}\right )} + \frac {{\left (32 \, b^{2} c^{3} d g - 128 \, a c^{4} d g + 10 \, b^{4} c f g - 48 \, a b^{2} c^{2} f g + 32 \, a^{2} c^{3} f g - 16 \, b^{3} c^{2} d h + 64 \, a b c^{3} d h - 7 \, b^{5} f h + 40 \, a b^{3} c f h - 48 \, a^{2} b c^{2} f h - 16 \, b^{3} c^{2} g e + 64 \, a b c^{3} g e + 10 \, b^{4} c h e - 48 \, a b^{2} c^{2} h e + 32 \, a^{2} c^{3} h e\right )} \log \left ({\left | -2 \, {\left (\sqrt {c} x - \sqrt {c x^{2} + b x + a}\right )} \sqrt {c} - b \right |}\right )}{256 \, c^{\frac {9}{2}}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [B] time = 0.01, size = 1117, normalized size = 3.47 \[ \text {result too large to display} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F(-2)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Exception raised: ValueError} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 5.62, size = 877, normalized size = 2.72 \[ d\,g\,\left (\frac {x}{2}+\frac {b}{4\,c}\right )\,\sqrt {c\,x^2+b\,x+a}-\frac {2\,a\,f\,h\,\left (\frac {\ln \left (\frac {b+2\,c\,x}{\sqrt {c}}+2\,\sqrt {c\,x^2+b\,x+a}\right )\,\left (b^3-4\,a\,b\,c\right )}{16\,c^{5/2}}+\frac {\left (-3\,b^2+2\,c\,x\,b+8\,c\,\left (c\,x^2+a\right )\right )\,\sqrt {c\,x^2+b\,x+a}}{24\,c^2}\right )}{5\,c}-\frac {5\,b\,e\,h\,\left (\frac {\ln \left (\frac {b+2\,c\,x}{\sqrt {c}}+2\,\sqrt {c\,x^2+b\,x+a}\right )\,\left (b^3-4\,a\,b\,c\right )}{16\,c^{5/2}}+\frac {\left (-3\,b^2+2\,c\,x\,b+8\,c\,\left (c\,x^2+a\right )\right )\,\sqrt {c\,x^2+b\,x+a}}{24\,c^2}\right )}{8\,c}-\frac {5\,b\,f\,g\,\left (\frac {\ln \left (\frac {b+2\,c\,x}{\sqrt {c}}+2\,\sqrt {c\,x^2+b\,x+a}\right )\,\left (b^3-4\,a\,b\,c\right )}{16\,c^{5/2}}+\frac {\left (-3\,b^2+2\,c\,x\,b+8\,c\,\left (c\,x^2+a\right )\right )\,\sqrt {c\,x^2+b\,x+a}}{24\,c^2}\right )}{8\,c}+\frac {d\,h\,\left (-3\,b^2+2\,c\,x\,b+8\,c\,\left (c\,x^2+a\right )\right )\,\sqrt {c\,x^2+b\,x+a}}{24\,c^2}+\frac {e\,g\,\left (-3\,b^2+2\,c\,x\,b+8\,c\,\left (c\,x^2+a\right )\right )\,\sqrt {c\,x^2+b\,x+a}}{24\,c^2}+\frac {e\,h\,x\,{\left (c\,x^2+b\,x+a\right )}^{3/2}}{4\,c}+\frac {f\,g\,x\,{\left (c\,x^2+b\,x+a\right )}^{3/2}}{4\,c}+\frac {7\,b\,f\,h\,\left (\frac {5\,b\,\left (\frac {\ln \left (\frac {b+2\,c\,x}{\sqrt {c}}+2\,\sqrt {c\,x^2+b\,x+a}\right )\,\left (b^3-4\,a\,b\,c\right )}{16\,c^{5/2}}+\frac {\left (-3\,b^2+2\,c\,x\,b+8\,c\,\left (c\,x^2+a\right )\right )\,\sqrt {c\,x^2+b\,x+a}}{24\,c^2}\right )}{8\,c}-\frac {x\,{\left (c\,x^2+b\,x+a\right )}^{3/2}}{4\,c}+\frac {a\,\left (\left (\frac {x}{2}+\frac {b}{4\,c}\right )\,\sqrt {c\,x^2+b\,x+a}+\frac {\ln \left (\frac {\frac {b}{2}+c\,x}{\sqrt {c}}+\sqrt {c\,x^2+b\,x+a}\right )\,\left (a\,c-\frac {b^2}{4}\right )}{2\,c^{3/2}}\right )}{4\,c}\right )}{10\,c}+\frac {f\,h\,x^2\,{\left (c\,x^2+b\,x+a\right )}^{3/2}}{5\,c}-\frac {a\,e\,h\,\left (\left (\frac {x}{2}+\frac {b}{4\,c}\right )\,\sqrt {c\,x^2+b\,x+a}+\frac {\ln \left (\frac {\frac {b}{2}+c\,x}{\sqrt {c}}+\sqrt {c\,x^2+b\,x+a}\right )\,\left (a\,c-\frac {b^2}{4}\right )}{2\,c^{3/2}}\right )}{4\,c}-\frac {a\,f\,g\,\left (\left (\frac {x}{2}+\frac {b}{4\,c}\right )\,\sqrt {c\,x^2+b\,x+a}+\frac {\ln \left (\frac {\frac {b}{2}+c\,x}{\sqrt {c}}+\sqrt {c\,x^2+b\,x+a}\right )\,\left (a\,c-\frac {b^2}{4}\right )}{2\,c^{3/2}}\right )}{4\,c}+\frac {d\,g\,\ln \left (\frac {\frac {b}{2}+c\,x}{\sqrt {c}}+\sqrt {c\,x^2+b\,x+a}\right )\,\left (a\,c-\frac {b^2}{4}\right )}{2\,c^{3/2}}+\frac {d\,h\,\ln \left (\frac {b+2\,c\,x}{\sqrt {c}}+2\,\sqrt {c\,x^2+b\,x+a}\right )\,\left (b^3-4\,a\,b\,c\right )}{16\,c^{5/2}}+\frac {e\,g\,\ln \left (\frac {b+2\,c\,x}{\sqrt {c}}+2\,\sqrt {c\,x^2+b\,x+a}\right )\,\left (b^3-4\,a\,b\,c\right )}{16\,c^{5/2}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \left (g + h x\right ) \sqrt {a + b x + c x^{2}} \left (d + e x + f x^{2}\right )\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________